package org.infodavid.common.model.impl.criteria;

import java.util.Locale;

import org.infodavid.common.model.criteria.ITemplateCriteria;
import org.infodavid.common.model.impl.criteria.ExtendedCriteriaImpl;

/**
 * The Class TemplateCriteriaImpl.
 */
public class TemplateCriteriaImpl extends ExtendedCriteriaImpl implements ITemplateCriteria {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = -5781804069003150078L;

	/** The name pattern. */
	private String namePattern = null;

	/** The locale. */
	private Locale locale = null;

	/**
	 * The Constructor.
	 */
	public TemplateCriteriaImpl() {
		super();
	}

	/*
	 * See super class or interface. (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.ITemplateCriteria#getNamePattern()
	 */
	public String getNamePattern() {
		return namePattern;
	}

	/*
	 * See super class or interface. (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.ITemplateCriteria#setNamePattern(java.lang.String)
	 */
	public void setNamePattern(final String value) {
		namePattern = value;
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.ITemplateCriteria#getLocale()
	 */
	public Locale getLanguage() {
		return locale;
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.ITemplateCriteria#setLocale(java.util.Locale)
	 */
	public void setLocale(final Locale value) {
		locale = value;
	}

	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		final StringBuilder builder = new StringBuilder();

		builder.append(super.toString());
		builder.append("[namePattern=");
		builder.append(namePattern);
		builder.append(", locale=");
		builder.append(locale);
		builder.append("]");

		return builder.toString();
	}
}
